/************************************************
*
*   filename:   main.cpp
*   date:       11/09/09
*
*   Created by
*       Kassandra Kaplan
*
*   purpose:
*       main engine main
*
*   Revisions:
*       - 11/9/09
*            Created header
*       - 11/12/09
*            Game loop written
*
*
*   copyright 2009 by
*       Cy Cook
*       Kassandra Kaplan
*       Blaise Millegan
*       Jason Stafford
*
************************************************/

#include "Engine.h"
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include <string>


using namespace std;
int main( int argc, char* args[] )
{
    engine game;
    bool stop = false;


    game.init();

    // main game loop
    // game ends when the update method
    // returns a true
    // redraw method allows the engine to decide
    // when the screen need to be redrawn
    while(stop == false)
    {
        stop = game.update();

        if(game.redraw() == true)
        {
            game.draw();
        }
    }

    game.close();

    return 0;
}
